home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pru_voicelineidol.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  124 lines

  1. # Jones 3D Cog Script
  2. #
  3. # PRU_voicelineIdol.cog
  4. #
  5. # Mini-cutscene when Indy sees original pedastal
  6. #
  7. # (GGJ)
  8. #
  9. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11. symbols
  12.  
  13. message     touched
  14. message        startup
  15. message        user0
  16. message        user1
  17.  
  18. thing       pedestal
  19. thing        actor                                local
  20.  
  21. template    tplActor=indy_sh_actor                    local
  22.  
  23. keyframe    armsCrossed=0in_stand2.key            local
  24. keyframe    crossingArms=0in_stand1_bd_2.key    local
  25. keyframe    shakingHead=0in_hedshak_2_2.key        local
  26. keyframe    armup=0in_armsout_1_1.key            local
  27.  
  28.  
  29. sound        hadIdol=pu02j03.wav                    local
  30.  
  31. int            player                                local
  32. int            trackNum                            local
  33. int            once=0                                local
  34. int            dartflying=0                        local
  35. int            keytrack                            local
  36.  
  37. vector        idolSpot                            local
  38.  
  39. end
  40. #=================================================================================================
  41. code
  42. startup:
  43. SetThingLight(pedestal, '0.4 0.4 0.35', 1.0, 1.25);
  44. return;
  45.  
  46. touched:
  47. player = GetLocalPlayerThing();
  48.  
  49. if (dartFlying == 1) return;
  50.  
  51. if ((GetSenderRef() != pedestal) || (once == 1)) return;
  52.  
  53. #Make sure the player isn't on top of the pedestal.
  54. if (VectorZ(GetThingPos(player)) < (VectorZ(GetThingPos(pedestal)) + 1.0))
  55. {
  56.     once = 1;
  57.     StartCutscene(1);
  58.     
  59.     #Stop the player from moving and put him in a standing position
  60.     #PlayMode(player, 1, 0);
  61.     MakeMeStop();
  62.     DeselectWeaponWait(player);
  63.     Sleep(0.01);
  64.     
  65.     #Create an actor at the player's location and swap them out
  66.     actor = CreateThing(tplActor, player);
  67.     CaptureThing(actor);
  68.     
  69.     CopyPlayerHolsters(player, actor);
  70.     SetThingFlags(player, 0x80000);
  71.     SetActorFlags(player, 0x200000);
  72.     ClearThingFlags(actor, 0x80000);
  73.     
  74.     #Tell the actor to look at a spot just above the pedestal.
  75.     idolSpot = VectorAdd(GetThingPos(pedestal), '0.0 0.0 0.1');
  76.     AISetLookPos(actor, idolSpot);
  77.     AIWaitForStop(actor);
  78.     
  79.     #Move the player to match the actor so the camera move will be correct.
  80.     CopyOrientandPos(actor, player);
  81.     
  82.     #Bring the camera around
  83.     SetExtCamLookOffset('0.0 0.04 0.014');
  84.     SetExtCamOffset('0.15 0.08 0.09');
  85.     
  86.     Sleep(1.0);
  87.     
  88.     #Indy crosses his arms, shakes his head, and says his line
  89. #    trackNum = PlayKey(actor, armsCrossed, 2, 0x10, 0);
  90.     
  91.     PlayVoice(actor, hadIdol, 1, 0);
  92.     Sleep(0.5);
  93.     keytrack = PlayKey(actor, armup, 4, 0x12, 0);
  94.     Sleep(0.75);
  95.     PauseKey(actor, keyTrack);
  96.     Sleep(0.5);
  97.     ResumeKey(actor, keyTrack);
  98.     Sleep(1.0);
  99.  
  100. #    PlayKey(actor, crossingArms, 4, 0x12, 1);
  101. #    PlayKey(actor, shakingHead, 2, 0x12, 1);
  102. #    Sleep(0.75);
  103. #    StopKey(actor, trackNum, 0.5);
  104.     
  105.     #Move the player again so he's in the same spot as the actor, and swap them back
  106.     CopyOrientandPos(actor, player);
  107.     SetThingFlags(actor, 0x80000);
  108.     ClearThingFlags(player, 0x80000);
  109.     ClearActorFlags(player, 0x200000);
  110.     
  111.     RestoreExtCam();
  112.     EndCutscene();
  113.     }
  114. return;
  115.  
  116. user0:
  117. dartFlying = 1;
  118. return;
  119.  
  120. user1:
  121. dartFlying = 0;
  122. return;
  123.  
  124. end